package com.originskyseed.platform.user.mapper;

import java.util.List;
import java.util.Map;

import com.originskyseed.platform.user.model.LevelSystemRelDept;
import org.apache.ibatis.annotations.Param;

/**
 * 等级体系关联公司信息Mapper类（OSI_LEVEL_SYSTEM_REL_DEPT）
 * 
 * @author Tangwanghui
 */
public interface LevelSystemRelDeptMapper {

	/**
	 * 删除记录
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 删除记录,通过部门id
	 *
	 * @param deptId
	 * @return
	 * @throws Exception
	 */
	public int deleteByDeptId(@Param("deptId") String deptId) throws Exception;

	/**
	 * 批量删除记录
	 * 
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(LevelSystemRelDept record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(LevelSystemRelDept record) throws Exception;

	/**
	 * 更新记录
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(LevelSystemRelDept record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(LevelSystemRelDept record) throws Exception;

	/**
	 * 查询记录
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public LevelSystemRelDept selectByPrimaryKey(String id) throws Exception;

	/**
	 * 查询列表
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<LevelSystemRelDept> selectList(LevelSystemRelDept record) throws Exception;

	/**
	 * 查询等级体系id是否存在
	 *
	 * @param systemId
	 * @return
	 * @throws Exception
	 */
	public String selectExistLevelSystem(@Param("systemId") String systemId) throws Exception;


	/**
	 * 查询等级体系id,通过部门id查询
	 *
	 * @param deptId
	 * @return
	 * @throws Exception
	 */
	public String selectLevelSystemIdByDeptId(@Param("deptId") String deptId) throws Exception;

	/**
	 * 分页查询列表
	 * 
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public List<LevelSystemRelDept> selectListByPage(Map<String, Object> params) throws Exception;

}